Add "pull --localcache-repo"
authorColin Walters <walters@verbum.org>
Thu, 29 Jun 2017 02:19:15 +0000 (22:19 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Fri, 30 Jun 2017 19:37:23 +0000 (19:37 +0000)
commit4273e670eaec12b86a23608deeaf593799306b51
treeac685f47f964c3f4a4c9c87c4e385af732aed600
parent1782a1c2797da38f69b147908d48711ecef8946f
Add "pull --localcache-repo"

This is a lot like `git clone --reference`, but we chose "localcache" as the
term "reference" is already used.

The main use case I'm targeting this for is the Fedora Atomic Host installer
case where we embed the repo content in the installer, but we may want to
kickstart and download newer content. There, while we want to get a newer ref,
we can still use the local repo as an object cache, since we have it sitting
there in memory anyways.

Another case is where one has a host ostree (say e.g. Fedora Atomic
Workstation), and one wants to create a local archive mirror of FAH. Then one
can use `pull --reference /ostree/repo` and pull the common objects (e.g.
contents of `bash.rpm` etc.)

Closes: https://github.com/ostreedev/ostree/issues/975
Closes: #982
Approved by: jlebon
Makefile-tests.am
man/ostree-pull.xml
src/libostree/ostree-repo-pull.c
src/ostree/ot-builtin-pull.c
tests/test-pull-localcache.sh [new file with mode: 0755]